<div class="lienhe">
	<div class="my-content">
		<h1>Giày Vinh Xinh</h1>
		<p class="lead" style="text-align:left;">
		<address style="font-size:12pt;"><br>
			tầng 1 chợ mới Phong Toàn<br>
			đối diện trường cao đẳng kinh tế<br>
			<abbr title="Phone">ĐT:</abbr> 094.393.6146 hoặc 091.289.7518
		</address>
		<a>Google maps</a>
		</p>
		<p><a class="btn btn-lg btn-success" href="#" role="button">Xem hàng</a></p>
	</div>
</div>
<div id="map-canvas"></div>
<style>
	.lienhe{
		padding: 10px 20px 10px 20px;
		color: #428bca;
		font-family: 'Patrick Hand', cursive;
		background-color: white;
		background-image: url('/files/background.jpg');
		background-repeat: no-repeat;
		background-size: contain;
		background-position: right;
		-webkit-box-shadow: rgb(170, 170, 170) 0px 0px 10px 0px;
	}
	.my-content{
		text-align: left;

	}
	.my-content a:hover{
		cursor: pointer;
	}
	.jumbotron{
		display: none;
	}
	div#map-canvas{
		margin-top: 20px;
		margin-bottom: 10px;
		-webkit-box-shadow: rgb(170, 170, 170) 0px 0px 10px 0px;
		height: 400px;
		width: 100%;
		padding: 0px;
	}
</style>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDN__82fMJcZf8SflF0BeeLgcY-YJ6q46k">
</script>
<script type="text/javascript">
	var gvxPos = new google.maps.LatLng(18.693804,105.685309);
	var infoWindow;
	var pos = null;
	var directionDisplay;
	var directionService;
	var map;
 	function initialize() {

	  	if(navigator.geolocation){
	  		navigator.geolocation.getCurrentPosition(function(position){
	  			pos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
				calcRoute();	
	  		});
	  	}

	    var mapOptions = {
	      center: { lat: -34.397, lng: 150.644},
	      zoom: 14
	    };
	    map = new google.maps.Map(document.getElementById('map-canvas'),
	        mapOptions);
	    infoWindow = new google.maps.InfoWindow({
			width:200,
			position: gvxPos,
			content:"<b>Giày Vinh Xinh<b><br/>Tầng 1 chợ mới Phong Toàn"
		});

		if(pos==null){
			map.setCenter(gvxPos);
			var marker = new google.maps.Marker({
		      	position: gvxPos,
		      	map: map,
		  	});
		  	google.maps.event.addListener(marker, 'click', function() {
			   	infoWindow.open(map,marker);
			});
		}
  	}
  
  	google.maps.event.addDomListener(window, 'load', initialize);

	function calcRoute() {
		directionsDisplay = new google.maps.DirectionsRenderer();
		directionsDisplay.setMap(map);
	  	var request = {
	      	origin:pos,
	      	destination:gvxPos,
	      	travelMode: google.maps.TravelMode.DRIVING
	  	};
	  	directionsService = new google.maps.DirectionsService();
	  	directionsService.route(request, function(response, status) {
	    	if (status == google.maps.DirectionsStatus.OK) {
	      		directionsDisplay.setDirections(response);
	    	}
	  	});
	}
</script>